package com.qijian.maindata.domain.vo;

import com.qijian.maindata.domain.CommonClassify;
import lombok.Data;
import lombok.ToString;

import java.util.ArrayList;
import java.util.List;

/**
 * 通用树形分类对象
 *
 * @author qijian
 * @date 2021-12-23
 */

@Data
@ToString
public class CommonClassifyVo extends CommonClassify {
    List<CommonClassifyVo> children;
    String parentName;

    public void addChildren(CommonClassifyVo supplierClassifyVo) {
        if (this.children == null)
            this.children = new ArrayList<>();
        this.children.add(supplierClassifyVo);
    }
}
